package dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import dao.XinChouDao;
import entity.Xinchou;

public class XinChouDaoImpl extends HibernateDaoSupport implements XinChouDao {

	public void addXinchou(Xinchou Xinchou) {
		getHibernateTemplate().save(Xinchou);
	}

	public void updateXinchou(Xinchou Xinchou) {
		getHibernateTemplate().update(Xinchou);
	}

	public void deleteXinchou(Long id) {
		Xinchou xinchou=getHibernateTemplate().get(Xinchou.class, id);
		getHibernateTemplate().delete(xinchou);
	}

	public Xinchou findOneXinchouById(Long id) {
		return getHibernateTemplate().get(Xinchou.class, id);
	}

	public List<Xinchou> findAllXinchou() {
		return getHibernateTemplate().find("from Xinchou");
	}

	public List<Xinchou> findXinchouByCondition(Map map) {
		// TODO Auto-generated method stub
		return null;
	}

}
